Repository navigation
Document why promote() allows string <-> binary and fixed(16) -> uuid - #4410
Open
rahulsmahadev wants to merge 3 commits into
Open
rahulsmahadev wants to merge 3 commits into
rahulsmahadev wants to merge 3 commits into
Conversation
update_column applied string <-> binary and fixed(16) -> uuid silently, using the read-side promote(). Check the spec's promotion list instead. Those three pairs now warn with a DeprecationWarning, and are rejected in a later release unless allow_incompatible_changes=True is set. Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
Author
|
@geruh, could you review the compatibility transition for these previously accepted schema changes? @Anurag-S1ngh, tagging you as the latest author of |
Co-authored-by: Isaac <no-reply@databricks.com>
Fokko
reviewed
Nov 18, 2026
Fokko
reviewed
Nov 18, 2026
Drop the deprecation: update_column keeps using promote(), the one place for type promotions. Comment why promote() allows string <-> binary and fixed(16) -> uuid, and test that update_column allows them. Co-authored-by: Isaac <no-reply@databricks.com>
Fokko
approved these changes
Nov 19, 2026
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding these comments @rahulsmahadev 👍
Fokko
enabled auto-merge
November 19, 2026 15:14
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 19, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
promote()allows three type changes that aren't valid promotions in the spec: string -> binary, binary -> string and fixed(16) -> uuid.update_column()andunion_by_name()usepromote(), so schema updates allow them too. That's on purpose (string <-> binary was discussed in apache/iceberg#5151, and fixed(16) -> uuid is there because older PyArrow versions had no UUID type), but the code didn't say so.This PR adds comments for these edge cases in
promote()and next to its use inupdate_column(). No behavior change.Are these changes tested?
Yes, added
test_update_column_allows_non_spec_promotionsintests/test_schema.py. It checks thatupdate_column()allows the three changes and still rejects fixed(15) -> uuid.test_promotionalready coverspromote()itself.Are there any user-facing changes?
No.
This pull request and its description were written by Isaac.